package org.dromara.visitor.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.dromara.visitor.domain.entity.RuleOrg;

import java.util.List;

public interface RuleOrgMapper extends BaseMapper<RuleOrg> {
    @Select("select ro.*,vo.org_name from vis_rule_org ro" +
           " left join vis_organization vo on vo.id = ro.org_id " +
           "where rule_id = #{id}")
    List<RuleOrg> listByRuleId(@Param("id") Long id);
}
